<?php
/**
 * Created by PhpStorm.
 * User: win7
 * Date: 2018/5/11 0011
 * Time: 16:10
 */
namespace Wx\Controller;
use Think\Controller;
class MyMemberController extends Controller
{
    public function Index(){
        $id = session("u_id");//member表id
        $member = M("member");
		if($_POST){
			$data['realname']=$_POST['realname'];
			$data['hometown']=$_POST['hometown'];
			$member->where("id = {$id}")->save($data);
			redirect('/Wx/User/');
		}
        $member_info = $member->where("id = {$id}")->find();
		$shop_community=D('shop_community');
		$getcom=$shop_community->where("id=".$member_info['c_id'])->find();
		$member_info['c_name']=$getcom['title'];//小区名臣
		$member_info['c_area']=getarea($getcom['a_id_1'])." ".getarea($getcom['a_id_2'])." ".getarea($getcom['a_id_3']);
        $this->assign('member',$member_info);

        $this->display('information');
    }//end fun index
}//end class